package com.example.teamtribe.json;

import com.example.teamtribe.database.Media;

/**
 * Created by lenovo on 2018/6/3.
 */

public class JsonMedia {
    private int code;
    private Media album;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public Media getMedia() {
        if(album.getId()!=-1) {//防止多次调用getMedia()将RealId多次改变
            album.setRealId(album.getId());
            album.setId(-1);
        }
        return album;
    }

    public void setMedia(Media media) {
        this.album = media;
    }
}
